# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=valadoc
pkgver=0.36.0
pkgrel=2
epoch=1
pkgdesc="A documentation tool for vala"
arch=(i686 x86_64)
url="https://git.gnome.org/browse/valadoc"
license=(GPL2)
depends=(vala gtk-doc graphviz libgee ttf-dejavu)
makedepends=(git)
_commit=a62ef4dbbc0d27ad39b1bc5aff309b59ebfa7504  # tags/0.36.0^0
source=("git+https://git.gnome.org/browse/valadoc#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
